$(function() {
	$(".error-pass, .error-ident, .error-psw, .error-rePsw, .error-user").hide();
	$(".overlay").hide();
	$(".confirmation").hide();
})

var textInput = $("input[type=text]");
var passInput = $("input[type=password]");
var usernameInput = $("input[name=username]");
var countErrors = 0;

//验证用户名
function checkUserName(ident) {
	var identReg = /^[\w\d]{4,16}$/;
	return identReg.test(ident);
}
//验证密码
function checkPwd(pwd) {
	var pwdReg = /^[\w\d]{4,12}$/;
	return pwdReg.test(pwd);
}
//验证两次密码一致
function checkRePwd() {
	var pwd = $("#pwd").val();
	var rePwd = $("#rePwd").val();
	return pwd === rePwd;
}

function warning(input, box, msgbox, msg) {
	$(box).fadeIn();
	$(msgbox).html(msg);
	$(input).addClass("warning");
	countErrors++;
}

function warningResult(input) {
	$(input).removeClass("warning");
}
// 登录验证
function validateForm() {

	
}

function cleandateForm() {
	textInput.val('');
	passInput.val('');
}

// 注册验证
function validateRegister() {


}
